import java.net.InetSocketAddress;

/*
    netstat -ano  查看所有端口
    netstat -ano|findstr “5900”  查看指定的端口
    tasklist|findstr "8696"  查看指定端口的进程
    ctrl+shift+esc 打开任务管理器
 */
public class Test2 {
    public static void main(String[] args) {
        InetSocketAddress socketAddress = new InetSocketAddress("127.0.0.1", 8080);
        InetSocketAddress socketAddress2 = new InetSocketAddress("localhost", 8080);
        System.out.println(socketAddress);
        System.out.println(socketAddress2);

        System.out.println(socketAddress.getAddress());
        System.out.println(socketAddress.getHostName());
        System.out.println(socketAddress.getPort());

        /*
            /127.0.0.1:8080
            localhost/127.0.0.1:8080

            /127.0.0.1
            activate.navicat.com
            8080
         */

    }
}
